import requests
from lxml import etree
url = 'http://www.sucaijishi.com/icon/'
res = requests.get(url)
# print(res.status_code)
res.encoding = res.apparent_encoding
ehtml = etree.HTML(res.text)
title = ehtml.xpath('//div[@class="w1180px common_list pt150"]/ul/li/a/img/@src')
title1 = ehtml.xpath('//div[@class="w1180px common_list pt150"]/ul/li/a/img/@alt')
# print(title)
# print(title1)
for i,j in zip(title,title1):
    response = requests.get(i)
    data = res.content
    filename = j + 'jpg'
    print(filename)
    with open(filename,'wb' ) as f :
        f.write(data)